<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets">


<ui:insert name="metadata" />

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Service Delivery</title>
	<h:outputStylesheet library="css" name="estilos.css" />

</h:head>
<h:body>
	<p:growl id="msgGlobal" sticky="true" />
	<p:layout fullPage="true">
		<p:layoutUnit header="Service Delivery" position="north"
			resizable="false" closable="false">
		</p:layoutUnit>

		<p:layoutUnit header="Menu Principal" position="west"
			resizable="false" closable="false">
			<h:form id="frmMnPrincipal">
				<p:panelMenu id="pnlMnPrincipal">
					<p:submenu label="Arquivo">
						<p:menuitem value="Autenticação"
							outcome="/pages/autenticacao.xhtml"
							rendered="#{autenticacaoBean.funcionarioLogado.funcao ==  null}" />
						<p:menuitem value="Principal" outcome="/pages/principal.xhtml" 
						rendered="#{autenticacaoBean.funcionarioLogado.funcao !=  null}"/>
						<p:menuitem value="Sair" action="#{autenticacaoBean.sair}"
						rendered="#{autenticacaoBean.funcionarioLogado.funcao !=  null}" />
					</p:submenu>

					<p:submenu label="Cadastros"
						rendered="#{autenticacaoBean.funcionarioLogado.funcao !=  null}">
						<p:menuitem value="Funcionarios"
							outcome="/pages/funcionariosPesquisa.xhtml" 
							rendered="#{autenticacaoBean.funcionarioLogado.funcao != 'atendente'}"/>
						<p:menuitem value="Clientes"
							outcome="/pages/clientePesquisa.xhtml" />
						<p:menuitem value="Serviços"
							outcome="/pages/servicosPesquisa.xhtml" />
						<p:menuitem value="Produtos"
							outcome="/pages/produtoPesquisa.xhtml" />
					</p:submenu>

					<p:submenu label="Pedidos"
						rendered="#{autenticacaoBean.funcionarioLogado.funcao !=  null}">
						<p:submenu value="Novo" >
						<p:menuitem value = "Marmita"/>
						<p:menuitem value = "Quentinha" outcome="/pages/pedidoCadastro.xhtml" />
						</p:submenu>
					</p:submenu>


				</p:panelMenu>
			</h:form>
		</p:layoutUnit>

		<p:layoutUnit header="" position="center" resizable="false"
			closable="false">
			<ui:insert name="conteudo" />
		</p:layoutUnit>

	</p:layout>


</h:body>
</html>